package com.news.model;

public class News {
    private int newsId;//新闻id
    private String title;//新闻标题
    private String content;//新闻内容
    private String category;//新闻分类
    private String author;//作者
    private long publishedAt;//发布时间
    private String imageUrl;//图片url
    public News(){}
    public News(String title, String content, String category, String author, long publishedAt, String imageUrl) {
        this.title = title;
        this.content = content;
        this.category = category;
        this.author = author;
        this.publishedAt = publishedAt;
        this.imageUrl = imageUrl;
    }
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public int getNewsId() {
        return newsId;
    }

    public void setNewsId(int newsId) {
        this.newsId = newsId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public long getPublishedAt() {
        return publishedAt;
    }

    public void setPublishedAt(long publishedAt) {
        this.publishedAt = publishedAt;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    @Override
    public String toString() {
        return "News{" +
                "newsId=" + newsId +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", category='" + category + '\'' +
                ", author='" + author + '\'' +
                ", publishedAt=" + publishedAt +
                ", imageUrl='" + imageUrl + '\'' +
                '}';
    }
}
